export enum BusinessType {
  OTHER = 0,
  CREATE = 1,
  UPDATE = 2,
  DELETE = 3,
}

export const BusinessTypeDetail: { [key: string]: { color: string; text: string } } = {
  [BusinessType.OTHER]: { color: "default", text: "其它" },
  [BusinessType.CREATE]: { color: "processing", text: "新增" },
  [BusinessType.UPDATE]: { color: "warning", text: "更新" },
  [BusinessType.DELETE]: { color: "error", text: "删除" },
};

export interface OperLogItem {
  operId: number;
  title: string;
  businessType: BusinessType;
  operTime: string;
  status: number;
}

export type PartialOperLogItem = Partial<OperLogItem>;

export interface LoginLogItem {
  infoId: number;
  userName: string;
  status: string;
  ipaddr: string;
  loginLocation: string;
  browser: string;
  os: string;
  msg: string;
  loginTime: string;
}

export type PartialLoginLogItem = Partial<LoginLogItem>;
